package com.qf.usermanage;

public class Demo01 {
    public static void main(String[] args) {
//        int[]arr=new int[5];
//        //存放对象的数组
//        User[]userArr=new User[10];
        //创建 UserService 对象
        UserService userService = new UserService();
        //注册用户
        User user = new User("小花","123456"); //创建 user 对象
        boolean register = userService.register(user);
        System.out.println(register);

        //下面这种会导致登陆成功，为什么
//        user.password = "123"//错误写法
//        boolean login = userService.login(user);

//        userService.register(new User("lisi","123"));
//        userService.register(new User("zhangsan","1234"));

        User user1 = new User("小花","123");
        boolean login = userService.login(user1);
        System.out.println("登陆结果"+login);
    }
}
